1. Field of the Invention
The present invention relates to an apparatus and a method for processing data that are used for recording or displaying color image data and are suitable for image processing.
2. Description of the Related Art
When natural image (picture) data is output with a printer, various types of image processing are required to obtain an image of satisfactory quality. FIG. 18 is a block diagram showing a general image-processing unit for outputting natural image data with a printer.
An input gamma converter 201 converts image data stored in a frame buffer 200 to signals that are linear in density, and a color converter 202 converts these signals to color material data of a printer (i.e., colors produced by an output device). Then, an output gamma converter 203 performs output gamma correction, and a halftone processing unit 204 converts the output data from the output gamma converter 203 to bitmap data (a dot pattern).
When error diffusion is used as a method for halftone processing of image data in this process, a line buffer 205 is used to diffuse a quantization error of a pixel of interest to surrounding pixels. The obtained bitmap data is temporarily stored in a page buffer 206. In general, a method (band processing) is used, in which parts of a page (a frame) are sequentially processed as bands to save the memory space of each of the frame buffer 200 and the page buffer 206. Hereinafter, it is presumed that band processing is used and that the line buffer 205 and the page buffer 206 are not distinguished from each other and are referred to as a band buffer.
Subsequently, when a print engine (not shown) is activated, the aforementioned bitmap data is read from the band buffer and an image is printed in synchronization with the engine.
The details of this series of operations vary with types of input images, print engines, or the like. For example, when the input image is monochrome, color conversion is omitted. When the input image is a natural image, error diffusion method is used as a method for halftone processing. On the other hand, when the input image is a graphic image, dithering is used as a method for halftone processing (for example, refer to Japanese Patent Laid-Open No. 5-183737). Color conversion corresponding to the number of colors produced by an output device is required. For example, when the number of colors produced by an output device is three, i.e., cyan, magenta, and yellow (CMY), color conversion corresponding to the three colors is required. Moreover, color conversion corresponding to more than three colors includes two separate steps: a first step of color matching and a second step of conversion to colors produced by an output device. In general, image data is processed with software executed on a processor, such as a CPU, to handle various types of input data, print engines, or the like, as described above.
However, image processing with software has a disadvantage such that the processing speed cannot keep up with an increase in the resolution of an input image. On the other hand, when various types of image processing are performed with hardware, separate hardware units corresponding to individual processing modes are required. Thus, a problem occurs, such that the size of the circuit becomes large. Moreover, a further problem exists, such that the entire structure of the hardware must be rebuilt, for example, when the specifications are changed.